package com.drakulo.hi.logic.io;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

/**
 * <b>Takes care of images</b>
 * <p>
 * Image loader. No path here, just loading. Static paths are ALL defined in Ressources.java
 * </p>
 */
public class ImageLoader {
	/**
	 * Loads an image from a Ressource
	 * 
	 * @param res
	 * @return
	 * @throws SlickException
	 */
	public static Image load(Resources res) throws SlickException {
		return new Image(res.path());
	}

	/**
	 * Simply load an image
	 * 
	 * @param path
	 *            - The image path
	 * @return the image
	 * @throws SlickException
	 */
	protected static Image load(String path) throws SlickException {
		return new Image(path);
	}
}
